Problem: In acute triangle $ABC$ points $P$ and $Q$ are the feet of the perpendiculars from $C$ to $\overline{AB}$ and from $B$ to $\overline{AC}$, respectively. Line $PQ$ intersects the circumcircle of $\triangle ABC$ in two distinct points, $X$ and $Y$. Suppose $XP=10$, $PQ=25$, and $QY=15$. The value of $AB\cdot AC$ can be written in the form $m\sqrt n$ where $m$ and $n$ are positive integers, and $n$ is not divisible by the square of any prime. Find $m+n$.

Explanation: Let $AP=a, AQ=b, \cos\angle A = k$
Therefore $AB= \frac{b}{k} , AC= \frac{a}{k}$
By power of point, we have $AP\cdot BP=XP\cdot YP , AQ\cdot CQ=YQ\cdot XQ$ Which are simplified to
$400= \frac{ab}{k} - a^2$
$525= \frac{ab}{k} - b^2$
Or
$a^2= \frac{ab}{k} - 400$
$b^2= \frac{ab}{k} - 525$
(1)
Or
$k= \frac{ab}{a^2+400} = \frac{ab}{b^2+525}$
Let $u=a^2+400=b^2+525$ Then, $a=\sqrt{u-400},b=\sqrt{u-525},k=\frac{\sqrt{(u-400)(u-525)}}{u}$
In triangle $APQ$, by law of cosine
$25^2= a^2 + b^2 - 2abk$
Pluging (1)
$625=  \frac{ab}{k} - 400 + \frac{ab}{k} - 525 -2abk$
Or
$\frac{ab}{k} - abk =775$
Substitute everything by $u$
$u- \frac{(u-400)(u-525)}{u} =775$
The quadratic term is cancelled out after simplified
Which gives $u=1400$
Plug back in, $a= \sqrt{1000} , b=\sqrt{875}$
Then
$AB\cdot AC= \frac{a}{k} \frac{b}{k} = \frac{ab}{\frac{ab}{u} \cdot\frac{ab}{u} } = \frac{u^2}{ab} = \frac{1400 \cdot 1400}{ \sqrt{ 1000\cdot 875 }} = 560 \sqrt{14}$
So the final answer is $560 + 14 = \boxed{574}$